<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../node_modules/jquery/dist/jquery.js"></script>
</head>
<body>

<script>
    var arr = [1,2,3];
    var obj = {1:3,3:4,5:6,7:8,length:5};
    //原生的js只能遍历数组,不能遍历伪数组
    arr.forEach(function (value, index) {
        console.log(value + "  ====  " + index);
    })

    //利用jQuery
    $.each(obj,function (index,value) {
        console.log(value + "  ====  " + index);
    })
</script>

</body>
</html>